home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
SETUP
/
US
/
CBUILDER
/
DATA.Z
/
MSACM.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-13
|
59KB
|
1,899 lines
//==========================================================================;
//
// msacm.h
//
// Copyright (c) 1992-1995 Microsoft Corporation. All Rights Reserved.
//
// Description:
// Audio Compression Manager Public Header File
//
// History:
//
//==========================================================================;
#ifndef _INC_ACM
#define _INC_ACM /* #defined if msacm.h has been included */
#pragma option -b
#if !defined(_INC_MMREG) || (_INC_MMREG < 142)
#ifndef RC_INVOKED
#error MMREG.H version 142 or greater to be included first
#endif
#endif
#if defined(WIN32) && !defined(_WIN32)
#ifndef RC_INVOKED
#pragma message("MSACM.H: defining _WIN32 because application defined WIN32")
#endif
#define _WIN32
#endif
#if defined(UNICODE) && !defined(_UNICODE)
#ifndef RC_INVOKED
#pragma message("MSACM.H: defining _UNICODE because application defined UNICODE")
#endif
#define _UNICODE
#endif
#ifdef __BORLANDC__
#pragma option -b.
#include <pshpack1.h>
#pragma option -b
#endif
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
//
//
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
#ifndef DRV_MAPPER_PREFERRED_INPUT_GET
#define DRV_MAPPER_PREFERRED_INPUT_GET (DRV_USER + 0)
#endif
#ifndef DRV_MAPPER_PREFERRED_OUTPUT_GET
#define DRV_MAPPER_PREFERRED_OUTPUT_GET (DRV_USER + 2)
#endif
#ifndef DRVM_MAPPER_STATUS
#define DRVM_MAPPER_STATUS (0x2000)
#endif
#ifndef WIDM_MAPPER_STATUS
#define WIDM_MAPPER_STATUS (DRVM_MAPPER_STATUS + 0)
#define WAVEIN_MAPPER_STATUS_DEVICE 0
#define WAVEIN_MAPPER_STATUS_MAPPED 1
#define WAVEIN_MAPPER_STATUS_FORMAT 2
#endif
#ifndef WODM_MAPPER_STATUS
#define WODM_MAPPER_STATUS (DRVM_MAPPER_STATUS + 0)
#define WAVEOUT_MAPPER_STATUS_DEVICE 0
#define WAVEOUT_MAPPER_STATUS_MAPPED 1
#define WAVEOUT_MAPPER_STATUS_FORMAT 2
#endif
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
//
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
#ifdef _WIN32
#define ACMAPI WINAPI
#else
#if defined(_WINDLL) || defined(__DLL__)
#define ACMAPI _far _pascal _loadds
#else
#define ACMAPI _far _pascal
#endif
#endif
//--------------------------------------------------------------------------;
//
// ACM General API's and Defines
//
//
//
//
//--------------------------------------------------------------------------;
//
// there are four types of 'handles' used by the ACM. the first three
// are unique types that define specific objects:
//
// HACMDRIVERID: used to _identify_ an ACM driver. this identifier can be
// used to _open_ the driver for querying details, etc about the driver.
//
// HACMDRIVER: used to manage a driver (codec, filter, etc). this handle
// is much like a handle to other media drivers--you use it to send
// messages to the converter, query for capabilities, etc.
//
// HACMSTREAM: used to manage a 'stream' (conversion channel) with the
// ACM. you use a stream handle to convert data from one format/type
// to another--much like dealing with a file handle.
//
//
// the fourth handle type is a generic type used on ACM functions that
// can accept two or more of the above handle types (for example the
// acmMetrics and acmDriverID functions).
//
// HACMOBJ: used to identify ACM objects. this handle is used on functions
// that can accept two or more ACM handle types.
//
DECLARE_HANDLE(HACMDRIVERID);
typedef HACMDRIVERID *PHACMDRIVERID;
typedef HACMDRIVERID FAR *LPHACMDRIVERID;
DECLARE_HANDLE(HACMDRIVER);
typedef HACMDRIVER *PHACMDRIVER;
typedef HACMDRIVER FAR *LPHACMDRIVER;
DECLARE_HANDLE(HACMSTREAM);
typedef HACMSTREAM *PHACMSTREAM;
typedef HACMSTREAM FAR *LPHACMSTREAM;
DECLARE_HANDLE(HACMOBJ);
typedef HACMOBJ *PHACMOBJ;
typedef HACMOBJ FAR *LPHACMOBJ;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// ACM Error Codes
//
// Note that these error codes are specific errors that apply to the ACM
// directly--general errors are defined as MMSYSERR_*.
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
#ifndef _MMRESULT_
#define _MMRESULT_
typedef UINT MMRESULT;
#endif
#define ACMERR_BASE (512)
#define ACMERR_NOTPOSSIBLE (ACMERR_BASE + 0)
#define ACMERR_BUSY (ACMERR_BASE + 1)
#define ACMERR_UNPREPARED (ACMERR_BASE + 2)
#define ACMERR_CANCELED (ACMERR_BASE + 3)
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// ACM Window Messages
//
// These window messages are sent by the ACM or ACM drivers to notify
// applications of events.
//
// Note that these window message numbers will also be defined in
// mmsystem.
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
#define MM_ACM_OPEN (MM_STREAM_OPEN) // conversion callback messages
#define MM_ACM_CLOSE (MM_STREAM_CLOSE)
#define MM_ACM_DONE (MM_STREAM_DONE)
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmGetVersion()
//
// the ACM version is a 32 bit number that is broken into three parts as
// follows:
//
// bits 24 - 31: 8 bit _major_ version number
// bits 16 - 23: 8 bit _minor_ version number
// bits 0 - 15: 16 bit build number
//
// this is then displayed as follows:
//
// bMajor = (BYTE)(dwVersion >> 24)
// bMinor = (BYTE)(dwVersion >> 16) &
// wBuild = LOWORD(dwVersion)
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
DWORD ACMAPI acmGetVersion
(
void
);
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmMetrics()
//
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
MMRESULT ACMAPI acmMetrics
(
HACMOBJ hao,
UINT uMetric,
LPVOID pMetric
);
#define ACM_METRIC_COUNT_DRIVERS 1
#define ACM_METRIC_COUNT_CODECS 2
#define ACM_METRIC_COUNT_CONVERTERS 3
#define ACM_METRIC_COUNT_FILTERS 4
#define ACM_METRIC_COUNT_DISABLED 5
#define ACM_METRIC_COUNT_HARDWARE 6
#define ACM_METRIC_COUNT_LOCAL_DRIVERS 20
#define ACM_METRIC_COUNT_LOCAL_CODECS 21
#define ACM_METRIC_COUNT_LOCAL_CONVERTERS 22
#define ACM_METRIC_COUNT_LOCAL_FILTERS 23
#define ACM_METRIC_COUNT_LOCAL_DISABLED 24
#define ACM_METRIC_HARDWARE_WAVE_INPUT 30
#define ACM_METRIC_HARDWARE_WAVE_OUTPUT 31
#define ACM_METRIC_MAX_SIZE_FORMAT 50
#define ACM_METRIC_MAX_SIZE_FILTER 51
#define ACM_METRIC_DRIVER_SUPPORT 100
#define ACM_METRIC_DRIVER_PRIORITY 101
//--------------------------------------------------------------------------;
//
// ACM Drivers
//
//
//
//
//--------------------------------------------------------------------------;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmDriverEnum()
//
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
typedef BOOL (CALLBACK *ACMDRIVERENUMCB)
(
HACMDRIVERID hadid,
DWORD dwInstance,
DWORD fdwSupport
);
MMRESULT ACMAPI acmDriverEnum
(
ACMDRIVERENUMCB fnCallback,
DWORD dwInstance,
DWORD fdwEnum
);
#define ACM_DRIVERENUMF_NOLOCAL 0x40000000L
#define ACM_DRIVERENUMF_DISABLED 0x80000000L
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
//
// acmDriverID()
//
//
//- - - - - - - - - - - - - - - - - - - - -